using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VAMZTR
    {
        public DataRow Convert2AMZTR(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryAMZTR(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["AMZMANDANT"] = " ".PadRight(2 ); 
         dwReturn["AMZMNRKRS"] = " ".PadRight(2 ); 
         dwReturn["AMZMLFDNR"] = " ".PadRight(4 ); 
         dwReturn["AMZMPOS"] = " ".PadRight(2 ); 
         dwReturn["AMZLFDPOS"] = " ".PadRight(10 ); 
         dwReturn["AMZDAT"] = " ".PadRight(0 ); 
         dwReturn["AMZZT"] = " ".PadRight(0 ); 
         dwReturn["AMZSCHICHT"] = " ".PadRight(1 ); 
         dwReturn["AMZASCHICHT"] = " ".PadRight(0 ); 
         dwReturn["AMZOKZ"] = " ".PadRight(1 ); 
         dwReturn["AMZAUFKRS"] = " ".PadRight(2 ); 
         dwReturn["AMZAUFLFD"] = " ".PadRight(6 ); 
         dwReturn["AMZAUFPOS"] = " ".PadRight(3 ); 
         dwReturn["AMZAFOLGE"] = " ".PadRight(3 ); 
         dwReturn["AMZTP"] = " ".PadRight(4 ); 
         dwReturn["AMZSTKNR"] = " ".PadRight(12 ); 
         dwReturn["AMZART"] = " ".PadRight(20 ); 
         dwReturn["AMZVAR"] = " ".PadRight(2 ); 
         dwReturn["AMZBAUMKRS1"] = " ".PadRight(2 ); 
         dwReturn["AMZBAUMLFD1"] = " ".PadRight(6 ); 
         dwReturn["AMZBAUMKRS2"] = " ".PadRight(2 ); 
         dwReturn["AMZBAUMLFD2"] = " ".PadRight(6 ); 
         dwReturn["AMZBAUMKRS3"] = " ".PadRight(2 ); 
         dwReturn["AMZBAUMLFD3"] = " ".PadRight(6 ); 
         dwReturn["AMZBAUMKRS4"] = " ".PadRight(2 ); 
         dwReturn["AMZBAUMLFD4"] = " ".PadRight(6 ); 
         dwReturn["AMZBAUMKRS5"] = " ".PadRight(2 ); 
         dwReturn["AMZBAUMLFD5"] = " ".PadRight(6 ); 
         dwReturn["AMZBAUMKRS6"] = " ".PadRight(2 ); 
         dwReturn["AMZBAUMLFD6"] = " ".PadRight(6 ); 
         dwReturn["AMZBAUMKRS7"] = " ".PadRight(2 ); 
         dwReturn["AMZBAUMLFD7"] = " ".PadRight(6 ); 
         dwReturn["AMZBAUMKRS8"] = " ".PadRight(2 ); 
         dwReturn["AMZBAUMLFD8"] = " ".PadRight(6 ); 
         dwReturn["AMZBAUMKRS9"] = " ".PadRight(2 ); 
         dwReturn["AMZBAUMLFD9"] = " ".PadRight(6 ); 
         dwReturn["AMZBAUMKRS10"] = " ".PadRight(2 ); 
         dwReturn["AMZBAUMLFD10"] = " ".PadRight(6 ); 
         dwReturn["AMZBAUMKRS11"] = " ".PadRight(2 ); 
         dwReturn["AMZBAUMLFD11"] = " ".PadRight(6 ); 
         dwReturn["AMZBAUMKRS12"] = " ".PadRight(2 ); 
         dwReturn["AMZBAUMLFD12"] = " ".PadRight(6 ); 
         dwReturn["AMZSCHUSS"] = " ".PadRight(0 ); 
         dwReturn["AMZSCHUSSBR"] = " ".PadRight(0 ); 
         dwReturn["AMZKETTFBR"] = " ".PadRight(0 ); 
         dwReturn["AMZASTOP"] = " ".PadRight(0 ); 
         dwReturn["AMZVSTOP"] = " ".PadRight(0 ); 
         dwReturn["AMZCL5BR"] = " ".PadRight(0 ); 
         dwReturn["AMZCL6BR"] = " ".PadRight(0 ); 
         dwReturn["AMZCL7BR"] = " ".PadRight(0 ); 
         dwReturn["AMZCL8BR"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP01"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP02"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP03"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP04"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP05"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP06"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP07"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP08"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP09"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP10"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP11"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP12"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP13"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP14"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP15"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP16"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP17"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP18"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP19"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP20"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP21"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP22"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP23"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP24"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP25"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP26"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP27"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP28"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP29"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP30"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP31"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP32"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP33"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP34"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP35"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP36"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP37"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP38"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP39"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP40"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP41"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP42"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP43"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP44"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP45"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP46"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP47"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP48"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP49"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP50"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP51"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP52"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP53"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP54"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP55"] = " ".PadRight(0 ); 
         dwReturn["AMZMSTOP56"] = " ".PadRight(0 ); 
         dwReturn["AMZKURZST"] = " ".PadRight(0 ); 
         dwReturn["AMZAPROD"] = " ".PadRight(0 ); 
         dwReturn["AMZBEOB"] = " ".PadRight(0 ); 
         dwReturn["AMZSMINHTS"] = " ".PadRight(0 ); 
         dwReturn["AMZIWENUEF"] = " ".PadRight(0 ); 
         dwReturn["AMZIGWENUEF"] = " ".PadRight(0 ); 
         dwReturn["AMZIGMANUEF"] = " ".PadRight(0 ); 
         dwReturn["AMZSSCHST"] = " ".PadRight(0 ); 
         dwReturn["AMZSTOUR"] = " ".PadRight(0 ); 
         dwReturn["AMZITOUR"] = " ".PadRight(0 ); 
         dwReturn["AMZSMANUEF"] = " ".PadRight(0 ); 
         dwReturn["AMZIMANUEF"] = " ".PadRight(0 ); 
         dwReturn["AMZANZBA"] = " ".PadRight(0 ); 
         dwReturn["AMZSCHUSSD"] = " ".PadRight(0 ); 
         dwReturn["AMZARTBRT"] = " ".PadRight(0 ); 
         dwReturn["AMZLO"] = " ".PadRight(2 ); 
         dwReturn["AMZMTYP"] = " ".PadRight(8 ); 
         dwReturn["AMZKSTKRS"] = " ".PadRight(8 ); 
         dwReturn["AMZKST"] = " ".PadRight(4 ); 
         dwReturn["AMZWEBBER"] = " ".PadRight(2 ); 
         dwReturn["AMZBENID"] = " ".PadRight(8 ); 
         dwReturn["AMZGRUPPE"] = " ".PadRight(2 ); 
         dwReturn["AMZMSGTYP"] = " ".PadRight(2 ); 
         dwReturn["AMZSSCHUSS"] = " ".PadRight(0 ); 
         dwReturn["AMZSMTR"] = " ".PadRight(0 ); 
         dwReturn["AMZKPOS"] = " ".PadRight(2 ); 
         dwReturn["AMZKLO"] = " ".PadRight(2 ); 
         dwReturn["AMZKLB"] = " ".PadRight(2 ); 
         dwReturn["AMZKLP"] = " ".PadRight(8 ); 
         dwReturn["AMZKMTR"] = " ".PadRight(0 ); 
         dwReturn["AMZSHSCHUSS"] = " ".PadRight(0 ); 
         dwReturn["AMZSSDAT"] = " ".PadRight(0 ); 
         dwReturn["AMZFAKTOR"] = " ".PadRight(0 ); 
         dwReturn["AMZFILLER"] = " ".PadRight(66 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapAMZTR(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveAMZTR(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryAMZTR(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapAMZTR(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertAMZTR(dwLocal, ITXDBVERSION);
            }
            UpdateAMZTR(dwLocal);
        }
        public void InsertAMZTR(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO AMZTR(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QueryAMZTR(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM AMZTR WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM AMZTR  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "AMZTR";
            Return = Result;
            return Return;
        }
        public void DeleteAMZTR(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM AMZTR   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdateAMZTR(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE AMZTR SET "
                    +"AMZMANDANT= :AMZMANDANT,"
                    +"AMZMNRKRS= :AMZMNRKRS,"
                    +"AMZMLFDNR= :AMZMLFDNR,"
                    +"AMZMPOS= :AMZMPOS,"
                    +"AMZLFDPOS= :AMZLFDPOS,"
                    +"AMZDAT= :AMZDAT,"
                    +"AMZZT= :AMZZT,"
                    +"AMZSCHICHT= :AMZSCHICHT,"
                    +"AMZASCHICHT= :AMZASCHICHT,"
                    +"AMZOKZ= :AMZOKZ,"
                    +"AMZAUFKRS= :AMZAUFKRS,"
                    +"AMZAUFLFD= :AMZAUFLFD,"
                    +"AMZAUFPOS= :AMZAUFPOS,"
                    +"AMZAFOLGE= :AMZAFOLGE,"
                    +"AMZTP= :AMZTP,"
                    +"AMZSTKNR= :AMZSTKNR,"
                    +"AMZART= :AMZART,"
                    +"AMZVAR= :AMZVAR,"
                    +"AMZBAUMKRS1= :AMZBAUMKRS1,"
                    +"AMZBAUMLFD1= :AMZBAUMLFD1,"
                    +"AMZBAUMKRS2= :AMZBAUMKRS2,"
                    +"AMZBAUMLFD2= :AMZBAUMLFD2,"
                    +"AMZBAUMKRS3= :AMZBAUMKRS3,"
                    +"AMZBAUMLFD3= :AMZBAUMLFD3,"
                    +"AMZBAUMKRS4= :AMZBAUMKRS4,"
                    +"AMZBAUMLFD4= :AMZBAUMLFD4,"
                    +"AMZBAUMKRS5= :AMZBAUMKRS5,"
                    +"AMZBAUMLFD5= :AMZBAUMLFD5,"
                    +"AMZBAUMKRS6= :AMZBAUMKRS6,"
                    +"AMZBAUMLFD6= :AMZBAUMLFD6,"
                    +"AMZBAUMKRS7= :AMZBAUMKRS7,"
                    +"AMZBAUMLFD7= :AMZBAUMLFD7,"
                    +"AMZBAUMKRS8= :AMZBAUMKRS8,"
                    +"AMZBAUMLFD8= :AMZBAUMLFD8,"
                    +"AMZBAUMKRS9= :AMZBAUMKRS9,"
                    +"AMZBAUMLFD9= :AMZBAUMLFD9,"
                    +"AMZBAUMKRS10= :AMZBAUMKRS10,"
                    +"AMZBAUMLFD10= :AMZBAUMLFD10,"
                    +"AMZBAUMKRS11= :AMZBAUMKRS11,"
                    +"AMZBAUMLFD11= :AMZBAUMLFD11,"
                    +"AMZBAUMKRS12= :AMZBAUMKRS12,"
                    +"AMZBAUMLFD12= :AMZBAUMLFD12,"
                    +"AMZSCHUSS= :AMZSCHUSS,"
                    +"AMZSCHUSSBR= :AMZSCHUSSBR,"
                    +"AMZKETTFBR= :AMZKETTFBR,"
                    +"AMZASTOP= :AMZASTOP,"
                    +"AMZVSTOP= :AMZVSTOP,"
                    +"AMZCL5BR= :AMZCL5BR,"
                    +"AMZCL6BR= :AMZCL6BR,"
                    +"AMZCL7BR= :AMZCL7BR,"
                    +"AMZCL8BR= :AMZCL8BR,"
                    +"AMZMSTOP01= :AMZMSTOP01,"
                    +"AMZMSTOP02= :AMZMSTOP02,"
                    +"AMZMSTOP03= :AMZMSTOP03,"
                    +"AMZMSTOP04= :AMZMSTOP04,"
                    +"AMZMSTOP05= :AMZMSTOP05,"
                    +"AMZMSTOP06= :AMZMSTOP06,"
                    +"AMZMSTOP07= :AMZMSTOP07,"
                    +"AMZMSTOP08= :AMZMSTOP08,"
                    +"AMZMSTOP09= :AMZMSTOP09,"
                    +"AMZMSTOP10= :AMZMSTOP10,"
                    +"AMZMSTOP11= :AMZMSTOP11,"
                    +"AMZMSTOP12= :AMZMSTOP12,"
                    +"AMZMSTOP13= :AMZMSTOP13,"
                    +"AMZMSTOP14= :AMZMSTOP14,"
                    +"AMZMSTOP15= :AMZMSTOP15,"
                    +"AMZMSTOP16= :AMZMSTOP16,"
                    +"AMZMSTOP17= :AMZMSTOP17,"
                    +"AMZMSTOP18= :AMZMSTOP18,"
                    +"AMZMSTOP19= :AMZMSTOP19,"
                    +"AMZMSTOP20= :AMZMSTOP20,"
                    +"AMZMSTOP21= :AMZMSTOP21,"
                    +"AMZMSTOP22= :AMZMSTOP22,"
                    +"AMZMSTOP23= :AMZMSTOP23,"
                    +"AMZMSTOP24= :AMZMSTOP24,"
                    +"AMZMSTOP25= :AMZMSTOP25,"
                    +"AMZMSTOP26= :AMZMSTOP26,"
                    +"AMZMSTOP27= :AMZMSTOP27,"
                    +"AMZMSTOP28= :AMZMSTOP28,"
                    +"AMZMSTOP29= :AMZMSTOP29,"
                    +"AMZMSTOP30= :AMZMSTOP30,"
                    +"AMZMSTOP31= :AMZMSTOP31,"
                    +"AMZMSTOP32= :AMZMSTOP32,"
                    +"AMZMSTOP33= :AMZMSTOP33,"
                    +"AMZMSTOP34= :AMZMSTOP34,"
                    +"AMZMSTOP35= :AMZMSTOP35,"
                    +"AMZMSTOP36= :AMZMSTOP36,"
                    +"AMZMSTOP37= :AMZMSTOP37,"
                    +"AMZMSTOP38= :AMZMSTOP38,"
                    +"AMZMSTOP39= :AMZMSTOP39,"
                    +"AMZMSTOP40= :AMZMSTOP40,"
                    +"AMZMSTOP41= :AMZMSTOP41,"
                    +"AMZMSTOP42= :AMZMSTOP42,"
                    +"AMZMSTOP43= :AMZMSTOP43,"
                    +"AMZMSTOP44= :AMZMSTOP44,"
                    +"AMZMSTOP45= :AMZMSTOP45,"
                    +"AMZMSTOP46= :AMZMSTOP46,"
                    +"AMZMSTOP47= :AMZMSTOP47,"
                    +"AMZMSTOP48= :AMZMSTOP48,"
                    +"AMZMSTOP49= :AMZMSTOP49,"
                    +"AMZMSTOP50= :AMZMSTOP50,"
                    +"AMZMSTOP51= :AMZMSTOP51,"
                    +"AMZMSTOP52= :AMZMSTOP52,"
                    +"AMZMSTOP53= :AMZMSTOP53,"
                    +"AMZMSTOP54= :AMZMSTOP54,"
                    +"AMZMSTOP55= :AMZMSTOP55,"
                    +"AMZMSTOP56= :AMZMSTOP56,"
                    +"AMZKURZST= :AMZKURZST,"
                    +"AMZAPROD= :AMZAPROD,"
                    +"AMZBEOB= :AMZBEOB,"
                    +"AMZSMINHTS= :AMZSMINHTS,"
                    +"AMZIWENUEF= :AMZIWENUEF,"
                    +"AMZIGWENUEF= :AMZIGWENUEF,"
                    +"AMZIGMANUEF= :AMZIGMANUEF,"
                    +"AMZSSCHST= :AMZSSCHST,"
                    +"AMZSTOUR= :AMZSTOUR,"
                    +"AMZITOUR= :AMZITOUR,"
                    +"AMZSMANUEF= :AMZSMANUEF,"
                    +"AMZIMANUEF= :AMZIMANUEF,"
                    +"AMZANZBA= :AMZANZBA,"
                    +"AMZSCHUSSD= :AMZSCHUSSD,"
                    +"AMZARTBRT= :AMZARTBRT,"
                    +"AMZLO= :AMZLO,"
                    +"AMZMTYP= :AMZMTYP,"
                    +"AMZKSTKRS= :AMZKSTKRS,"
                    +"AMZKST= :AMZKST,"
                    +"AMZWEBBER= :AMZWEBBER,"
                    +"AMZBENID= :AMZBENID,"
                    +"AMZGRUPPE= :AMZGRUPPE,"
                    +"AMZMSGTYP= :AMZMSGTYP,"
                    +"AMZSSCHUSS= :AMZSSCHUSS,"
                    +"AMZSMTR= :AMZSMTR,"
                    +"AMZKPOS= :AMZKPOS,"
                    +"AMZKLO= :AMZKLO,"
                    +"AMZKLB= :AMZKLB,"
                    +"AMZKLP= :AMZKLP,"
                    +"AMZKMTR= :AMZKMTR,"
                    +"AMZSHSCHUSS= :AMZSHSCHUSS,"
                    +"AMZSSDAT= :AMZSSDAT,"
                    +"AMZFAKTOR= :AMZFAKTOR,"
                    +"AMZFILLER= :AMZFILLER,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("AMZMANDANT", OracleType.NVarChar).Value = dwData["AMZMANDANT"].ToString(); 
          or1.Parameters.Add("AMZMNRKRS", OracleType.NVarChar).Value = dwData["AMZMNRKRS"].ToString(); 
          or1.Parameters.Add("AMZMLFDNR", OracleType.NVarChar).Value = dwData["AMZMLFDNR"].ToString(); 
          or1.Parameters.Add("AMZMPOS", OracleType.NVarChar).Value = dwData["AMZMPOS"].ToString(); 
          or1.Parameters.Add("AMZLFDPOS", OracleType.NVarChar).Value = dwData["AMZLFDPOS"].ToString(); 
          or1.Parameters.Add("AMZDAT", OracleType.NVarChar).Value = dwData["AMZDAT"].ToString(); 
          or1.Parameters.Add("AMZZT", OracleType.NVarChar).Value = dwData["AMZZT"].ToString(); 
          or1.Parameters.Add("AMZSCHICHT", OracleType.NVarChar).Value = dwData["AMZSCHICHT"].ToString(); 
          or1.Parameters.Add("AMZASCHICHT", OracleType.NVarChar).Value = dwData["AMZASCHICHT"].ToString(); 
          or1.Parameters.Add("AMZOKZ", OracleType.NVarChar).Value = dwData["AMZOKZ"].ToString(); 
          or1.Parameters.Add("AMZAUFKRS", OracleType.NVarChar).Value = dwData["AMZAUFKRS"].ToString(); 
          or1.Parameters.Add("AMZAUFLFD", OracleType.NVarChar).Value = dwData["AMZAUFLFD"].ToString(); 
          or1.Parameters.Add("AMZAUFPOS", OracleType.NVarChar).Value = dwData["AMZAUFPOS"].ToString(); 
          or1.Parameters.Add("AMZAFOLGE", OracleType.NVarChar).Value = dwData["AMZAFOLGE"].ToString(); 
          or1.Parameters.Add("AMZTP", OracleType.NVarChar).Value = dwData["AMZTP"].ToString(); 
          or1.Parameters.Add("AMZSTKNR", OracleType.NVarChar).Value = dwData["AMZSTKNR"].ToString(); 
          or1.Parameters.Add("AMZART", OracleType.NVarChar).Value = dwData["AMZART"].ToString(); 
          or1.Parameters.Add("AMZVAR", OracleType.NVarChar).Value = dwData["AMZVAR"].ToString(); 
          or1.Parameters.Add("AMZBAUMKRS1", OracleType.NVarChar).Value = dwData["AMZBAUMKRS1"].ToString(); 
          or1.Parameters.Add("AMZBAUMLFD1", OracleType.NVarChar).Value = dwData["AMZBAUMLFD1"].ToString(); 
          or1.Parameters.Add("AMZBAUMKRS2", OracleType.NVarChar).Value = dwData["AMZBAUMKRS2"].ToString(); 
          or1.Parameters.Add("AMZBAUMLFD2", OracleType.NVarChar).Value = dwData["AMZBAUMLFD2"].ToString(); 
          or1.Parameters.Add("AMZBAUMKRS3", OracleType.NVarChar).Value = dwData["AMZBAUMKRS3"].ToString(); 
          or1.Parameters.Add("AMZBAUMLFD3", OracleType.NVarChar).Value = dwData["AMZBAUMLFD3"].ToString(); 
          or1.Parameters.Add("AMZBAUMKRS4", OracleType.NVarChar).Value = dwData["AMZBAUMKRS4"].ToString(); 
          or1.Parameters.Add("AMZBAUMLFD4", OracleType.NVarChar).Value = dwData["AMZBAUMLFD4"].ToString(); 
          or1.Parameters.Add("AMZBAUMKRS5", OracleType.NVarChar).Value = dwData["AMZBAUMKRS5"].ToString(); 
          or1.Parameters.Add("AMZBAUMLFD5", OracleType.NVarChar).Value = dwData["AMZBAUMLFD5"].ToString(); 
          or1.Parameters.Add("AMZBAUMKRS6", OracleType.NVarChar).Value = dwData["AMZBAUMKRS6"].ToString(); 
          or1.Parameters.Add("AMZBAUMLFD6", OracleType.NVarChar).Value = dwData["AMZBAUMLFD6"].ToString(); 
          or1.Parameters.Add("AMZBAUMKRS7", OracleType.NVarChar).Value = dwData["AMZBAUMKRS7"].ToString(); 
          or1.Parameters.Add("AMZBAUMLFD7", OracleType.NVarChar).Value = dwData["AMZBAUMLFD7"].ToString(); 
          or1.Parameters.Add("AMZBAUMKRS8", OracleType.NVarChar).Value = dwData["AMZBAUMKRS8"].ToString(); 
          or1.Parameters.Add("AMZBAUMLFD8", OracleType.NVarChar).Value = dwData["AMZBAUMLFD8"].ToString(); 
          or1.Parameters.Add("AMZBAUMKRS9", OracleType.NVarChar).Value = dwData["AMZBAUMKRS9"].ToString(); 
          or1.Parameters.Add("AMZBAUMLFD9", OracleType.NVarChar).Value = dwData["AMZBAUMLFD9"].ToString(); 
          or1.Parameters.Add("AMZBAUMKRS10", OracleType.NVarChar).Value = dwData["AMZBAUMKRS10"].ToString(); 
          or1.Parameters.Add("AMZBAUMLFD10", OracleType.NVarChar).Value = dwData["AMZBAUMLFD10"].ToString(); 
          or1.Parameters.Add("AMZBAUMKRS11", OracleType.NVarChar).Value = dwData["AMZBAUMKRS11"].ToString(); 
          or1.Parameters.Add("AMZBAUMLFD11", OracleType.NVarChar).Value = dwData["AMZBAUMLFD11"].ToString(); 
          or1.Parameters.Add("AMZBAUMKRS12", OracleType.NVarChar).Value = dwData["AMZBAUMKRS12"].ToString(); 
          or1.Parameters.Add("AMZBAUMLFD12", OracleType.NVarChar).Value = dwData["AMZBAUMLFD12"].ToString(); 
          or1.Parameters.Add("AMZSCHUSS", OracleType.NVarChar).Value = dwData["AMZSCHUSS"].ToString(); 
          or1.Parameters.Add("AMZSCHUSSBR", OracleType.NVarChar).Value = dwData["AMZSCHUSSBR"].ToString(); 
          or1.Parameters.Add("AMZKETTFBR", OracleType.NVarChar).Value = dwData["AMZKETTFBR"].ToString(); 
          or1.Parameters.Add("AMZASTOP", OracleType.NVarChar).Value = dwData["AMZASTOP"].ToString(); 
          or1.Parameters.Add("AMZVSTOP", OracleType.NVarChar).Value = dwData["AMZVSTOP"].ToString(); 
          or1.Parameters.Add("AMZCL5BR", OracleType.NVarChar).Value = dwData["AMZCL5BR"].ToString(); 
          or1.Parameters.Add("AMZCL6BR", OracleType.NVarChar).Value = dwData["AMZCL6BR"].ToString(); 
          or1.Parameters.Add("AMZCL7BR", OracleType.NVarChar).Value = dwData["AMZCL7BR"].ToString(); 
          or1.Parameters.Add("AMZCL8BR", OracleType.NVarChar).Value = dwData["AMZCL8BR"].ToString(); 
          or1.Parameters.Add("AMZMSTOP01", OracleType.NVarChar).Value = dwData["AMZMSTOP01"].ToString(); 
          or1.Parameters.Add("AMZMSTOP02", OracleType.NVarChar).Value = dwData["AMZMSTOP02"].ToString(); 
          or1.Parameters.Add("AMZMSTOP03", OracleType.NVarChar).Value = dwData["AMZMSTOP03"].ToString(); 
          or1.Parameters.Add("AMZMSTOP04", OracleType.NVarChar).Value = dwData["AMZMSTOP04"].ToString(); 
          or1.Parameters.Add("AMZMSTOP05", OracleType.NVarChar).Value = dwData["AMZMSTOP05"].ToString(); 
          or1.Parameters.Add("AMZMSTOP06", OracleType.NVarChar).Value = dwData["AMZMSTOP06"].ToString(); 
          or1.Parameters.Add("AMZMSTOP07", OracleType.NVarChar).Value = dwData["AMZMSTOP07"].ToString(); 
          or1.Parameters.Add("AMZMSTOP08", OracleType.NVarChar).Value = dwData["AMZMSTOP08"].ToString(); 
          or1.Parameters.Add("AMZMSTOP09", OracleType.NVarChar).Value = dwData["AMZMSTOP09"].ToString(); 
          or1.Parameters.Add("AMZMSTOP10", OracleType.NVarChar).Value = dwData["AMZMSTOP10"].ToString(); 
          or1.Parameters.Add("AMZMSTOP11", OracleType.NVarChar).Value = dwData["AMZMSTOP11"].ToString(); 
          or1.Parameters.Add("AMZMSTOP12", OracleType.NVarChar).Value = dwData["AMZMSTOP12"].ToString(); 
          or1.Parameters.Add("AMZMSTOP13", OracleType.NVarChar).Value = dwData["AMZMSTOP13"].ToString(); 
          or1.Parameters.Add("AMZMSTOP14", OracleType.NVarChar).Value = dwData["AMZMSTOP14"].ToString(); 
          or1.Parameters.Add("AMZMSTOP15", OracleType.NVarChar).Value = dwData["AMZMSTOP15"].ToString(); 
          or1.Parameters.Add("AMZMSTOP16", OracleType.NVarChar).Value = dwData["AMZMSTOP16"].ToString(); 
          or1.Parameters.Add("AMZMSTOP17", OracleType.NVarChar).Value = dwData["AMZMSTOP17"].ToString(); 
          or1.Parameters.Add("AMZMSTOP18", OracleType.NVarChar).Value = dwData["AMZMSTOP18"].ToString(); 
          or1.Parameters.Add("AMZMSTOP19", OracleType.NVarChar).Value = dwData["AMZMSTOP19"].ToString(); 
          or1.Parameters.Add("AMZMSTOP20", OracleType.NVarChar).Value = dwData["AMZMSTOP20"].ToString(); 
          or1.Parameters.Add("AMZMSTOP21", OracleType.NVarChar).Value = dwData["AMZMSTOP21"].ToString(); 
          or1.Parameters.Add("AMZMSTOP22", OracleType.NVarChar).Value = dwData["AMZMSTOP22"].ToString(); 
          or1.Parameters.Add("AMZMSTOP23", OracleType.NVarChar).Value = dwData["AMZMSTOP23"].ToString(); 
          or1.Parameters.Add("AMZMSTOP24", OracleType.NVarChar).Value = dwData["AMZMSTOP24"].ToString(); 
          or1.Parameters.Add("AMZMSTOP25", OracleType.NVarChar).Value = dwData["AMZMSTOP25"].ToString(); 
          or1.Parameters.Add("AMZMSTOP26", OracleType.NVarChar).Value = dwData["AMZMSTOP26"].ToString(); 
          or1.Parameters.Add("AMZMSTOP27", OracleType.NVarChar).Value = dwData["AMZMSTOP27"].ToString(); 
          or1.Parameters.Add("AMZMSTOP28", OracleType.NVarChar).Value = dwData["AMZMSTOP28"].ToString(); 
          or1.Parameters.Add("AMZMSTOP29", OracleType.NVarChar).Value = dwData["AMZMSTOP29"].ToString(); 
          or1.Parameters.Add("AMZMSTOP30", OracleType.NVarChar).Value = dwData["AMZMSTOP30"].ToString(); 
          or1.Parameters.Add("AMZMSTOP31", OracleType.NVarChar).Value = dwData["AMZMSTOP31"].ToString(); 
          or1.Parameters.Add("AMZMSTOP32", OracleType.NVarChar).Value = dwData["AMZMSTOP32"].ToString(); 
          or1.Parameters.Add("AMZMSTOP33", OracleType.NVarChar).Value = dwData["AMZMSTOP33"].ToString(); 
          or1.Parameters.Add("AMZMSTOP34", OracleType.NVarChar).Value = dwData["AMZMSTOP34"].ToString(); 
          or1.Parameters.Add("AMZMSTOP35", OracleType.NVarChar).Value = dwData["AMZMSTOP35"].ToString(); 
          or1.Parameters.Add("AMZMSTOP36", OracleType.NVarChar).Value = dwData["AMZMSTOP36"].ToString(); 
          or1.Parameters.Add("AMZMSTOP37", OracleType.NVarChar).Value = dwData["AMZMSTOP37"].ToString(); 
          or1.Parameters.Add("AMZMSTOP38", OracleType.NVarChar).Value = dwData["AMZMSTOP38"].ToString(); 
          or1.Parameters.Add("AMZMSTOP39", OracleType.NVarChar).Value = dwData["AMZMSTOP39"].ToString(); 
          or1.Parameters.Add("AMZMSTOP40", OracleType.NVarChar).Value = dwData["AMZMSTOP40"].ToString(); 
          or1.Parameters.Add("AMZMSTOP41", OracleType.NVarChar).Value = dwData["AMZMSTOP41"].ToString(); 
          or1.Parameters.Add("AMZMSTOP42", OracleType.NVarChar).Value = dwData["AMZMSTOP42"].ToString(); 
          or1.Parameters.Add("AMZMSTOP43", OracleType.NVarChar).Value = dwData["AMZMSTOP43"].ToString(); 
          or1.Parameters.Add("AMZMSTOP44", OracleType.NVarChar).Value = dwData["AMZMSTOP44"].ToString(); 
          or1.Parameters.Add("AMZMSTOP45", OracleType.NVarChar).Value = dwData["AMZMSTOP45"].ToString(); 
          or1.Parameters.Add("AMZMSTOP46", OracleType.NVarChar).Value = dwData["AMZMSTOP46"].ToString(); 
          or1.Parameters.Add("AMZMSTOP47", OracleType.NVarChar).Value = dwData["AMZMSTOP47"].ToString(); 
          or1.Parameters.Add("AMZMSTOP48", OracleType.NVarChar).Value = dwData["AMZMSTOP48"].ToString(); 
          or1.Parameters.Add("AMZMSTOP49", OracleType.NVarChar).Value = dwData["AMZMSTOP49"].ToString(); 
          or1.Parameters.Add("AMZMSTOP50", OracleType.NVarChar).Value = dwData["AMZMSTOP50"].ToString(); 
          or1.Parameters.Add("AMZMSTOP51", OracleType.NVarChar).Value = dwData["AMZMSTOP51"].ToString(); 
          or1.Parameters.Add("AMZMSTOP52", OracleType.NVarChar).Value = dwData["AMZMSTOP52"].ToString(); 
          or1.Parameters.Add("AMZMSTOP53", OracleType.NVarChar).Value = dwData["AMZMSTOP53"].ToString(); 
          or1.Parameters.Add("AMZMSTOP54", OracleType.NVarChar).Value = dwData["AMZMSTOP54"].ToString(); 
          or1.Parameters.Add("AMZMSTOP55", OracleType.NVarChar).Value = dwData["AMZMSTOP55"].ToString(); 
          or1.Parameters.Add("AMZMSTOP56", OracleType.NVarChar).Value = dwData["AMZMSTOP56"].ToString(); 
          or1.Parameters.Add("AMZKURZST", OracleType.NVarChar).Value = dwData["AMZKURZST"].ToString(); 
          or1.Parameters.Add("AMZAPROD", OracleType.NVarChar).Value = dwData["AMZAPROD"].ToString(); 
          or1.Parameters.Add("AMZBEOB", OracleType.NVarChar).Value = dwData["AMZBEOB"].ToString(); 
          or1.Parameters.Add("AMZSMINHTS", OracleType.NVarChar).Value = dwData["AMZSMINHTS"].ToString(); 
          or1.Parameters.Add("AMZIWENUEF", OracleType.NVarChar).Value = dwData["AMZIWENUEF"].ToString(); 
          or1.Parameters.Add("AMZIGWENUEF", OracleType.NVarChar).Value = dwData["AMZIGWENUEF"].ToString(); 
          or1.Parameters.Add("AMZIGMANUEF", OracleType.NVarChar).Value = dwData["AMZIGMANUEF"].ToString(); 
          or1.Parameters.Add("AMZSSCHST", OracleType.NVarChar).Value = dwData["AMZSSCHST"].ToString(); 
          or1.Parameters.Add("AMZSTOUR", OracleType.NVarChar).Value = dwData["AMZSTOUR"].ToString(); 
          or1.Parameters.Add("AMZITOUR", OracleType.NVarChar).Value = dwData["AMZITOUR"].ToString(); 
          or1.Parameters.Add("AMZSMANUEF", OracleType.NVarChar).Value = dwData["AMZSMANUEF"].ToString(); 
          or1.Parameters.Add("AMZIMANUEF", OracleType.NVarChar).Value = dwData["AMZIMANUEF"].ToString(); 
          or1.Parameters.Add("AMZANZBA", OracleType.NVarChar).Value = dwData["AMZANZBA"].ToString(); 
          or1.Parameters.Add("AMZSCHUSSD", OracleType.NVarChar).Value = dwData["AMZSCHUSSD"].ToString(); 
          or1.Parameters.Add("AMZARTBRT", OracleType.NVarChar).Value = dwData["AMZARTBRT"].ToString(); 
          or1.Parameters.Add("AMZLO", OracleType.NVarChar).Value = dwData["AMZLO"].ToString(); 
          or1.Parameters.Add("AMZMTYP", OracleType.NVarChar).Value = dwData["AMZMTYP"].ToString(); 
          or1.Parameters.Add("AMZKSTKRS", OracleType.NVarChar).Value = dwData["AMZKSTKRS"].ToString(); 
          or1.Parameters.Add("AMZKST", OracleType.NVarChar).Value = dwData["AMZKST"].ToString(); 
          or1.Parameters.Add("AMZWEBBER", OracleType.NVarChar).Value = dwData["AMZWEBBER"].ToString(); 
          or1.Parameters.Add("AMZBENID", OracleType.NVarChar).Value = dwData["AMZBENID"].ToString(); 
          or1.Parameters.Add("AMZGRUPPE", OracleType.NVarChar).Value = dwData["AMZGRUPPE"].ToString(); 
          or1.Parameters.Add("AMZMSGTYP", OracleType.NVarChar).Value = dwData["AMZMSGTYP"].ToString(); 
          or1.Parameters.Add("AMZSSCHUSS", OracleType.NVarChar).Value = dwData["AMZSSCHUSS"].ToString(); 
          or1.Parameters.Add("AMZSMTR", OracleType.NVarChar).Value = dwData["AMZSMTR"].ToString(); 
          or1.Parameters.Add("AMZKPOS", OracleType.NVarChar).Value = dwData["AMZKPOS"].ToString(); 
          or1.Parameters.Add("AMZKLO", OracleType.NVarChar).Value = dwData["AMZKLO"].ToString(); 
          or1.Parameters.Add("AMZKLB", OracleType.NVarChar).Value = dwData["AMZKLB"].ToString(); 
          or1.Parameters.Add("AMZKLP", OracleType.NVarChar).Value = dwData["AMZKLP"].ToString(); 
          or1.Parameters.Add("AMZKMTR", OracleType.NVarChar).Value = dwData["AMZKMTR"].ToString(); 
          or1.Parameters.Add("AMZSHSCHUSS", OracleType.NVarChar).Value = dwData["AMZSHSCHUSS"].ToString(); 
          or1.Parameters.Add("AMZSSDAT", OracleType.NVarChar).Value = dwData["AMZSSDAT"].ToString(); 
          or1.Parameters.Add("AMZFAKTOR", OracleType.NVarChar).Value = dwData["AMZFAKTOR"].ToString(); 
          or1.Parameters.Add("AMZFILLER", OracleType.NVarChar).Value = dwData["AMZFILLER"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
